Adherence to prophylactic medications is crucial if HIV-infected patients are to avoid preventable opportunistic infections. As well, it si critical if patients are to benefit from the protease inhibitors and other highly active antiretroviral medications. However, to date, there is only one interventional trial to improve adherence with medications in this patient population. This study was a randomized, controlled, interventional trial to improve adherence with Pneumocystis carinii (PCP) prophylaxis among patients with HIV infection. The hypothesis is that medication adherence can be improved by improving patients' knowledge of their medication regimen and reasons for medication taking. In the randomized trial, patients assigned to the intervention group received individualized education regarding their medication regimen and were taught tailoring, how to better incorporated medication taking into their daily routine. The intervention was conducted by a study nurse during an exit interview at the end of each regularly scheduled clinic visit. The patients assigned to the control group did not participate in this structured education. The outcome, adherence with PCP prophylaxis medication, was measured using MEMS caps, electronic bottle caps that measure the date and time the medication bottle is opened.